﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Trans.session;
namespace Trans.city
{
    public partial class select_city : Form
    {
        public select_city()
        {
            InitializeComponent();
        }

        private void select_city_Load(object sender, EventArgs e)
        {
            
            this.tb_cityTableAdapter.Fill(this.dataSet.tb_city);
            

        }

        public int Id
        {
            get
            {
                return (int)gv_city.SelectedRows[0].Cells["id"].Value;
            }
        }

        public string Name_s
        {
            get
            {
                return (string)gv_city.SelectedRows[0].Cells["name"].Value;
            }
        }
        public bool HasSelected
        {
            get{
                return gv_city.SelectedRows.Count > 0;
            }
        }
        private void ultraButton1_Click(object sender, EventArgs e)
        {

        }

        private void gv_city_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
        {
            session.Color_Const.set_gv_color(gv_city);
        }

        private void ultraButton2_Click(object sender, EventArgs e)
        {

        }
    }
}
